Skip to main content

Help Modifier

The Help modifier allows you to display help text in Kontakt's Info Pane when hovering over a component with this modifier.

modifier Help

This modifier was introduced in Kontakt 8.8.

Example

In the simplest form you simply apply the modifier to a component and provide the text you want to be displayed:

import { Rectangle } from ui
import { Help } from kontakt

export var main = Rectangle(color: Color(0xFF242424)) with {
Help("Info Text")
}

Using External Help Text Files

You may want to externalize help text from your code when the text is lengthy or needs to be easily editable by team members without modifying the code. For this purpose, the Help modifier supports an optional info_hints.json file which can be placed in the Resources/komplete_scripts folder.

If this file is present, the text provided to the Help modifier acts as a key into the JSON file to find the actual help text to display. If the key isn't found, the key itself will be displayed as a fallback.

Here's an example info_hints.json file for the example above:

{
"Info Text": "This is the actual info text."
}

If the info_hints.json file is malformed, an error will be displayed in the log and all Help modifiers will simply display the text passed to them.

Rich Text

The help text can make use of some basic HTML annotations to emphasize parts in it. These annotations work both for the text passed to the modifier and the text in the info_hints.json file. These are the supported annotations:

  • <b>Bold</b>
  • <i>Italic</i>
  • <u>Underlined</u>
import { Rectangle } from ui
import { Help } from kontakt

export var main = Rectangle(color: Color(0xFF242424)) with {
Help("<b>I</b> am <u>Rich</u>")
}

Constructor

(_ text)

_ text: String

The text to display in the Info Pane.

info

Note that the text can act as a key into the info_hints.json as explained in the Using External Help Text Files section.

Layout Behavior

None.